package com.utc.fjc.command.checkconsistent;

import java.util.ArrayList;
import java.util.List;

import com.utc.teamcenter.common.app.excel.CellInfo;

public class LogInfo {
	private String ebomItemId = "";
	private String ebomLevelId = "";
	private String ebomQuantityId = "";
	private String cadbomItemId = "";
	private String cadbomLevelId = "";
	private String cadbomQuantityId = "";
	private String result = "";
	private String message = "";

	public LogInfo() {
		super();
		// TODO Auto-generated constructor stub
	}

	public LogInfo(String ebomItemId, String ebomLevelId,
			String ebomQuantityId, String cadbomItemId, String cadbomLevelId,
			String cadbomQuantityId, String result, String message) {
		super();
		this.ebomItemId = ebomItemId;
		this.ebomLevelId = ebomLevelId;
		this.ebomQuantityId = ebomQuantityId;
		this.cadbomItemId = cadbomItemId;
		this.cadbomLevelId = cadbomLevelId;
		this.cadbomQuantityId = cadbomQuantityId;
		this.result = result;
		this.message = message;
	}
	
	public static List<CellInfo> getCellInfo(int row, List<LogInfo> infos) {
		List<CellInfo> cells = new ArrayList<CellInfo>();
		if (infos != null) {
			for (LogInfo logInfo : infos) {
				int col = 0;
				cells.add(new CellInfo(row, col++, logInfo.getEbomItemId()));
				cells.add(new CellInfo(row, col++, logInfo.getEbomLevelId()));
				cells.add(new CellInfo(row, col++, logInfo.getEbomQuantityId()));
				cells.add(new CellInfo(row, col++, logInfo.getCadbomItemId()));
				cells.add(new CellInfo(row, col++, logInfo.getCadbomLevelId()));
				cells.add(new CellInfo(row, col++, logInfo.getCadbomQuantityId()));
				cells.add(new CellInfo(row, col++, logInfo.getResult()));
				cells.add(new CellInfo(row, col++, logInfo.getMessage()));
				row++;
			}
		}

		return cells;
	}

	public String getEbomItemId() {
		return ebomItemId;
	}

	public void setEbomItemId(String ebomItemId) {
		this.ebomItemId = ebomItemId;
	}

	public String getEbomLevelId() {
		return ebomLevelId;
	}

	public void setEbomLevelId(String ebomLevelId) {
		this.ebomLevelId = ebomLevelId;
	}

	public String getEbomQuantityId() {
		return ebomQuantityId;
	}

	public void setEbomQuantityId(String ebomQuantityId) {
		this.ebomQuantityId = ebomQuantityId;
	}

	public String getCadbomItemId() {
		return cadbomItemId;
	}

	public void setCadbomItemId(String cadbomItemId) {
		this.cadbomItemId = cadbomItemId;
	}

	public String getCadbomLevelId() {
		return cadbomLevelId;
	}

	public void setCadbomLevelId(String cadbomLevelId) {
		this.cadbomLevelId = cadbomLevelId;
	}

	public String getCadbomQuantityId() {
		return cadbomQuantityId;
	}

	public void setCadbomQuantityId(String cadbomQuantityId) {
		this.cadbomQuantityId = cadbomQuantityId;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
